package com.amit.Basic_Simple_Program;

import java.util.Scanner;

public class Armstrong_Number 
{

	public static void main(String[] args) 
	{

		System.out.println("Please enter a numer");
		Scanner sc=new Scanner(System.in);
		int sum=0;
		int n=sc.nextInt();
		int m=n;
		for(;n>0;)   
		
		{
		int rem=n%10;
		sum=sum+(rem*rem*rem);
		n=n/10;
			
		}
		if(m==sum)
		{
			System.out.println("it is a armstrong number");
		}
		else
		{
			System.out.println("it is not armstrong");
		}
	}

}
